package yf.mall.vo.down;


import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.*;
import java.io.Serializable;


import java.math.BigDecimal;

import yf.mall.entity.ShopLogRuleEntity;
import yf.mall.vo.ShopLogRuleVo;

                            import yf.mall.enums.ShopLogRuleStatusEnum;

/**
 * 规则实体
 * 表名 shop_log_rule
 *
 *
 *
 * @date Wed Aug 19 17:10:55 CST 2020
 */
@Data
public class ShopLogRuleDown implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

                        //
            @ExcelProperty("")
            private Long id;
        
                        //模板ID
            @ExcelProperty("模板ID")
            private Long logId;
        
                        //省区
            @ExcelProperty("省区")
            private String province;
        
                        //首重
            @ExcelProperty("首重")
            private String fw;
        
                        //首重价格
            @ExcelProperty("首重价格")
            private BigDecimal fp;
        
                        //超出价格单价
            @ExcelProperty("超出价格单价")
            private BigDecimal up;
        
                        //ENUM-是否默认:"NO-否","YES-是"
            @ExcelIgnore
            private Integer status;
                        @ExcelProperty("是否默认")
            private String statusStr;
        
    
    public ShopLogRuleDown() {

    }

    public ShopLogRuleDown(ShopLogRuleVo vo) {
        ShopLogRuleEntity entity = vo.getEntity();
                                    this.setId(entity.getId());
            
                                    this.setLogId(entity.getLogId());
            
                                    this.setProvince(entity.getProvince());
            
                                    this.setFw(entity.getFw());
            
                                    this.setFp(entity.getFp());
            
                                    this.setUp(entity.getUp());
            
                                    this.setStatus(entity.getStatus());
                if(entity.getStatus()!=null){
                    this.setStatusStr( ShopLogRuleStatusEnum.indexOf(entity.getStatus()));
                }
            
            }


}
